package deepbitview

/**
 * a sample measured at a certain time
 */
class Sample {

    static constraints = {
    }

    /**
     * asociations
     */
    static hasMany = [workerInstances:WorkerInstance]

    /**
     * the current hash rate of this sample
     */
    double hashRate

    /**
     * the current reward associated with this account
     */
    double reward

    /**
     * the current calculation difficulty
     */
    Long difficulty

    /**
     * estimate for the next difficulty
     */
    Long nextDifficultyEstimate

    /**
     * how many bitcoins are in existance
     */
    double globalBitCoinAmount

    /**
     * the glable network speed in terra hashs
     */
    double globalNetworkSpeed

    /**
     * how many blocks are known currently
     */
    Long globalyKnownBlocks

    /**
     * the current exchange rate for bitcoins to usd at the time of this sample
     * if there is an exception it will be set to the TickerService.ERROR_CODE value
     */
    double exchangeRateUSD

    /**
     * associated workers of this sample
     */
    SortedSet<WorkerInstance> workerInstances

    /**
     * when was this sample sampled
     */
    Date sampleTime
}
